<extend name="zh_cn:Public:base" />
<block name="title">
    <title>美住 - 接口服务</title>
</block>
<block name="extendHead">
    <link rel="stylesheet" type="text/css" href="/Public/dist/Home/common_control.css?rev=65393a524028c7e3b76e961a08059c7d">
    <link rel="stylesheet" type="text/css" href="/Public/dist/Home/InterfaceServerPage/InterfaceServer.css?rev=fda3119c4ae662c9f47c96880472666d">
</block>
<block name="document">
    <div id="doc" class="container-above-md">
        <include file="zh_cn:Public:Include_control_navbar" navbar-menu-setting="active" />
        <div id="doc-body" class="row">
            <include file="zh_cn:Public:Include_interface_serve" doc-side-interface="active" />
            <div id="doc-center">   
                <div class="content-panel">
                    <div class="content-panel-header">
                        <div class="content-panel-title">接口服务</div>
                    </div>
                    <div class="content-panel-body">
                        <div class="content-panel-help">当前客栈：{$hotelName}&nbsp;&nbsp;<span class="text-accent">申请条件：客栈和微预定必须已通过认证</span></div>
                        <table class="table content-panel-table">
                            <thead>
                                <tr>
                                    <th>接口类型</th>
                                    <th>接口介绍</th>
                                    <th>接口文档</th>
                                    <th><span style="margin-left: 120px;">配置信息</span></th>
                                    <th>申请服务</th>
                                </tr>
                            </thead>
                            <tbody>
                                <volist name="serverInfo" id="vo">
                                    <tr>
                                        <td class="col-xs-2">{$vo.name}</td>
                                        <td class="col-xs-2">{$vo.description}</td>
                                        <td class="col-xs-2">
                                            <div class="btn-link"><a href="{$vo.downurl}">下载</a></div>
                                        </td>
                                        <empty name="vo['applyInfo']">
                                            <td class="col-xs-5">暂无信息</td>
                                        <else />
                                            <td class="col-xs-5">
                                               <div class="interface-connent">
                                                   <div class="interface"><span>URL：</span><span>{$vo['applyInfo']['url']}</span><span class="btn-link" data-toggle="modal" data-id='{$vo.id}' data-url="{$vo['applyInfo']['url']}" data-target="#editURLModal">修改</span></div>
                                                   <div class="interface"><span>APPID：</span><span>{$vo['applyInfo']['mz_appid']}</span></div>
                                                   <div class="interface"><span>Auth Token：</span><span>{$vo['applyInfo']['mz_key']}</span><span class="btn-link reseturl" data-id='{$vo.id}' data-url="{$vo['applyInfo']['url']}">重置</span></div>                                               	
                                               </div>

                                           </td>
                                        </empty>
                                        <empty name="vo['applyInfo']">
                                            <td class="col-xs-1">
                                                <div class="btn-link" data-toggle="modal" data-id='{$vo.id}' data-name="{$vo.name}" data-target="#submitURLModal">提交申请</div>
                                            </td>
                                        <else />
                                            <td class="col-xs-1">
                                                <div>&nbsp;&nbsp;已申请</div>
                                            </td>
                                        </empty>
                                        
                                    </tr>
                                </volist>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <!--end of doc-center-->
        </div>
        <!--end of doc body-->
    </div>
    <!--end of doc-->
    <!--修改URL-->
    <div class="modal fade" data-backdrop="static" id="editURLModal">
        <div class="modal-dialog sm-width">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <div class="modal-title">修改URL</div>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal form-sm" id="">
                        <div class="form-group">
                            <label class="col-xs-2 control-label">修改URL</label>
                            <div class="col-xs-9">
                                <input type="text" class="form-control" id="requestEditURL" maxlength="255" autocomplete="off" placeholder="请输入URL" />
                            </div>
                        </div>                      
                    </form>
                    <div class="content-tip-help">
                        <div>请填写完整URL：http://www.php.net/index.php</div>
                    </div>
                </div>
                <div class="modal-footer">
                    <div class="form-horizontal form-sm">
                        <div class="form-group">
                            <div class="col-xs-10 col-xs-offset-2">
                                <div class="help-block inline-help-block inline-help-block-right"></div>
                                <!--<button type="button" class="btn-sm btn-primary btn-raised" data-dismiss="modal" aria-label="Close">取消</button>-->
                                <button type="button" class="btn-sm btn-primary btn-raised" data-value="" id="requestEdit">确认提交</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>    
    <!--申请提交-->
    <div class="modal fade" data-backdrop="static" id="submitURLModal">
        <div class="modal-dialog sm-width">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <div class="modal-title">填写资料</div>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal form-sm" id="">
                        <div class="form-group">
                            <label class="col-xs-2 control-label"><span class="text-accent">*</span>当前客栈</label>
                            <div class="col-xs-9">
                                <input type="text" class="form-control" value="{$hotelName}" readonly="readonly" style="background: #fff;border: 0;box-shadow:inherit ;line-height: 36px;" />
                            </div>                            
                        </div>     
                        <div class="form-group">
                            <label class="col-xs-2 control-label"><span class="text-accent">*</span>申请服务</label>
                            <div class="col-xs-9">
                                <input type="text" class="form-control" value="" id="requestInterfaceName" readonly="readonly" style="background: #fff;border: 0;box-shadow:inherit ;line-height: 36px;" />
                            </div>                            
                        </div>                          
                        <div class="form-group">
                            <label class="col-xs-2 control-label">配置URL</label>
                            <div class="col-xs-9">
                                <input type="text" class="form-control" id="requestURL" maxlength="255" autocomplete="off" placeholder="请输入URL" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-2 control-label" style="padding: 0;">
                                <label class="checkbox ulite-js-checkbox ulite-js-ripple-effect"  style="margin: 0;float: right;">
                                    <input type="checkbox" class="checkbox-input checkbox-facility" id="server-agreement"/>
                                    <span class="checkbox-label"></span>
                                </label>
                            </label>
                            <div class="col-xs-9" style="font-size: 12px;height: 36px;">
                                <span style="margin-top: 2px;display: inline-block;">我已阅读并同意此协议&nbsp;</span>
                                <span style="margin-top: -3px;display: inline-block;height: 18px;line-height: 18px;" data-toggle="modal"  data-target="#protocalModal" class="btn-link">《服务协议》</span>
                            </div>
                        </div>
                    </form>
                    <div class="content-tip-help">
                        <div>请填写完整URL：http://www.php.net/index.php</div>
                    </div>
                </div>
                <div class="modal-footer">
                    <div class="form-horizontal form-sm">
                        <div class="form-group">
                            <div class="col-xs-10 col-xs-offset-2">
                                <div class="help-block inline-help-block inline-help-block-right"></div>
                                <!--<button type="button" class="btn-sm btn-primary btn-raised" data-dismiss="modal" aria-label="Close">取消</button>-->
                                <button type="button" class="btn-sm btn-primary btn-raised" data-value="" disabled="disabled" id="requestAdd">确认提交</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>      
    
    <div class="modal fade" data-backdrop="static" id="protocalModal">
        <div class="modal-dialog sm-width">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <div class="modal-title">美住接口合作协议</div>
                </div>
                <div class="modal-body">
                    <p>特别提示：</p>
                    <p>本协议由广州畅联信息科技有限公司（下称“畅联科技”）和你共同签订，具有合同法律效力。</p>
                    <p>在使用美住接口服务（下称“本服务”）前，请你务必审慎阅读并充分理解各条款内容，特别是免除或者限制责任的条款、争议解决和法律适用条款。免除或者限制责任的条款可能以加粗字体显示，你应重点阅读。除非你已阅读并接受本协议所有条款，否则你无权使用本服务。你使用本服务即视为你已阅读并同意本协议的约束。如你对本协议有任何疑问的，应向客服咨询。</p>
                    <p>1、除本协议另有约定外，未经一方书面同意，任何一方不得将本协议内容、用户个人信息、用户支付信息以及接口技术、安全协议及证书等透露给第三方。</p>
                    <p>2、本协议使用的标题仅为方便之目的，不应用于解释本协议的任何部分。</p>
                    <p>3、任何一方均不得向第三方透露该协议的内容，除非事先征得协议对方当事人的同意。</p>
                </div>
            </div>
        </div>
    </div>          
</block>
<block name="extendFootJs">
    <script type="text/javascript" src="/Public/dist/Home/common_control.js?rev=b068a314e7294938880462ae75484c5d"></script>
    <script type="text/javascript" src="/Public/dist/Home/InterfaceServerPage/InterfaceServer.js?rev=a90d5580da24f6a2119b52e28f59a24d"></script>
</block>
